import request from "@/utils/request.js";

/**
 * @description 新租售列表
 * @param { { page: number; cate_id?: number; } } data 
 * @returns 
 */
export function getNewSales(data) {
	return request.post('car/newSale', data);
}

/**
 * @description 我的车
 * @returns 
 */
export function getMyNewCar() {
	return request.post('car/myNewCar');
}

/**
 * @description 发布车辆
 * @returns 
 */
export function releasedNewSale(data) {
	return request.post('car/releasedNewSale', data);
}

/**
 * @description 车辆详情
 * @returns 
 */
export function fetchCarDetail(data) {
	return request.post('car/carDetail', data);
}

/**
 * @description 外观颜色
 * @returns 
 */
export function appearanceColor() {
	return request.post('car/appearanceColor');
}

/**
 * @description 订单确认
 * @returns 
 */
export function carOrderDetail(data) {
	return request.post('car/carOrderDetail', data);
}

/**
 * @description 订单确认
 * @returns 
 */
export function addSublease(data) {
	return request.post('car/addSublease', data);
}

/**
 * @description 新租售列表
 * @returns 
 */
export function subleaseList(status) {
	return request.post('car/subleaseList', { status });
}

export function cancelApply(data) {
  return request.post('car/cancelApply', data)
}

export function signing(data) {
  return request.post('car/signing', data)
}

export function accountInfo() {
  return request.post('car/accountInfo')
}

export function uploadPay(data) {
  return request.post('car/uploadPay', data)
}

export function rentKnowledge(data) {
  return request.post('car/rentKnowledge', data)
}